import Vue from 'vue'
import Router from 'vue-router'

const Index = () => import('@/pages/index')
const NotFound = () => import('@/pages/notFound')
const HomeIndex = () => import('@/pages/home/index')
const HomeList = () => import('@/pages/home/list')
const DiscoveryIndex = () => import('@/pages/discovery/index')
const MessageIndex = () => import('@/pages/message/index')
const MyIndex = () => import('@/pages/my/index')

Vue.use(Router)

export default new Router({
    routes: [{
        path: '/',
        name: 'index',
        component: Index,
        meta: {
            title: '项目目录',
            keepAlive: true,
            auth: false,
        }
    }, {
        path: '/home',
        name: 'home',
        component: HomeIndex,
        meta: {
            title: '首页',
            keepAlive: false,
            auth: false,
        }
    }, {
        path: '/home/list',
        name: 'homelist',
        component: HomeList,
        meta: {
            title: '列表页面',
            keepAlive: false,
            auth: false,
        }
    }, {
        path: '/discovery',
        name: 'discovery',
        component: DiscoveryIndex,
        meta: {
            title: '发现',
            keepAlive: false,
            auth: false,
        }
    }, {
        path: '/message',
        name: 'message',
        component: MessageIndex,
        meta: {
            title: '消息',
            keepAlive: false,
            auth: false,
        }
    }, {
        path: '/my',
        name: 'my',
        component: MyIndex,
        meta: {
            title: '我的',
            keepAlive: false,
            auth: false,
        }
    }]
})
